************************************************************************************************
** Raspberry Pi Hotspot for Projecting Rapture Kit content over captive Wi-Fi in a browser
** No Internet Required
************************************************************************************************

# RKPi5 v2.1 — Documentation (Markdown)

---

# 1) Read Me First (v2.1)

**Goal**
Turn a Raspberry Pi 5 into a **portable captive-portal hotspot** that serves the Rapture Kit training site **offline** to connected devices.

**What’s in this build**

* Fixed user & paths for Golden Master → duplication

  * User: `rk-pi5-user`
  * Scripts: `/home/rk-pi5-user/Desktop/scripts`
  * Content: `/home/rk-pi5-user/Desktop/rapture_kit`
* USB-first workflow: scripts in `_rkpi5/`, content under `Section*` on the USB
* SPA fallback and nginx config ready for offline serving
* Orchestrator provides verbose progress and a log at `~/Desktop/rkpi5-setup.log`

**Hardware**

* Raspberry Pi 5
* 128 GB microSD (Pi OS preconfigured with Wi-Fi and user)
* USB drive containing:

  * `_rkpi5/*.sh`
  * `Section*` content (≈26 GB) and any root files (e.g., `_Read Me First.pdf`)

**Quick Start**

1. Boot the Pi with your prepared microSD.
2. Insert the USB (auto-mounts under `/media/rk-pi5-user/<USB_LABEL>/`).
3. Open Terminal and run the orchestrator **from USB**:

   ```bash
   bash /media/rk-pi5-user/<USB_LABEL>/_rkpi5/setup-golden-master.sh
   ```

   The orchestrator copies scripts/content to the Desktop, fixes permissions/line endings, ensures a root `index.html`, and runs steps 0→5.
4. Connect a client to **SSID `rapture_kit`**. Captive page → **Enter Training Portal** → accept SSL warning → portal loads: `https://rapturekit.com/rapture_kit/`.

**Access**

* Landing: `http://10.42.0.1/`
* Portal: `https://rapturekit.com/rapture_kit/`
* Admin: `https://rapturekit.com/admin/` (user `RKPi5-admin`, pass `Isa1ah46:9-10`)
* Content root: `/home/rk-pi5-user/Desktop/rapture_kit`

**Troubleshooting**

* **Portal shows but Enter → error**: confirm `/home/rk-pi5-user/Desktop/rapture_kit/index.html` exists.
* **No captive page**: go to `http://10.42.0.1/` directly; ensure hotspot step completed.
* **HTTPS health**: `curl -k https://10.42.0.1/health`
* **Restart web**: `sudo systemctl restart nginx`  

---

